package org.openea.eap.module.obpm.service.custsql;

import com.alibaba.fastjson.JSONObject;
import org.openbpm.base.api.response.impl.ResultMsg;
import org.openbpm.base.manager.Manager;
import org.openea.eap.module.obpm.model.custsql.FormCustSql;
import org.openea.eap.module.obpm.model.custsql.vo.SqlFieldsVO;

import java.util.List;

public interface FormCustSqlManager extends Manager<String, FormCustSql> {
  FormCustSql getByCode(String code, boolean getFields);

  ResultMsg<String> save(FormCustSql formCustSql);

  ResultMsg<List<SqlFieldsVO>> parseSql(FormCustSql formCustSql);

  ResultMsg<JSONObject> export(String ids);

  ResultMsg<String> importJson(String json);

  void removeCustSqlByIds(String[] aryIds);

  JSONObject toJson(FormCustSql formCustSql);

  void checkModuleInFormCustSql(FormCustSql formCustSql);
}
